#ifndef ZIGBUSTYPE_H
#define ZIGBUSTYPE_H

#include "ZigbusItem.h"

#define TYPE_SIZE           5

#define TYPE_UNDEFINED      0x00
#define TYPE_NUMERIC_OUTPUT 0x01
#define TYPE_NUMERIC_INPUT  0x02
#define TYPE_PWM_OUTPUT     0x03
#define TYPE_ANALOGIC_INPUT 0x04
#define TYPE_LIGHT          0x05
#define TYPE_HEATER         0x06
#define TYPE_METEO          0x07
#define TYPE_SERVO          0x08
#define TYPE_TOKEN          0x09
#define TYPE_REMOTE         0x0A
#define TYPE_SERIAL         0x0B


class ZigbusType : public ZigbusItem
{
public:
    ZigbusType();
    ZigbusType(int value);
    ZigbusType(const ZigbusType& other);

    virtual QString text() const;

    virtual ~ZigbusType() { }
    static ZigbusType UNDEFINED() { return ZigbusType(TYPE_UNDEFINED); }
    static ZigbusType NUMERIC_OUTPUT() { return ZigbusType(TYPE_NUMERIC_OUTPUT); }
    static ZigbusType NUMERIC_INPUT() { return ZigbusType(TYPE_NUMERIC_INPUT); }
    static ZigbusType PWM_OUTPUT() { return ZigbusType(TYPE_PWM_OUTPUT); }
    static ZigbusType ANALOGIC_INPUT() { return ZigbusType(TYPE_ANALOGIC_INPUT); }
    static ZigbusType LIGHT() { return ZigbusType(TYPE_LIGHT); }
    static ZigbusType HEATER() { return ZigbusType(TYPE_HEATER); }
    static ZigbusType METEO() { return ZigbusType(TYPE_METEO); }
    static ZigbusType SERVO() { return ZigbusType(TYPE_SERVO); }
    static ZigbusType TOKEN() { return ZigbusType(TYPE_TOKEN); }
    static ZigbusType REMOTE() { return ZigbusType(TYPE_REMOTE); }
    static ZigbusType SERIAL() { return ZigbusType(TYPE_SERIAL); }
    virtual QString type() const { return "type"; }

};

#endif // ZIGBUSTYPE_H
